package com.jilefojing.service;

import java.util.List;

import com.jilefojing.beans.enums.ItemTypeEnumForSource;
import com.jilefojing.beans.enums.ProgressStatusForSource;
import com.jilefojing.beans.enums.StatusEnumForPublish;
import com.jilefojing.beans.exception.UserContextException;
import com.jilefojing.beans.pojos.RCategorySource;
import com.jilefojing.beans.pojos.enhanced.EnhancedRCategorySource;
import com.jilefojing.beans.query.RCategorySourceQuery;
import com.jilefojing.beans.vo.Pagination;
import com.jilefojing.context.beans.vo.UserContext;
import com.jilefojing.service.base.IBaseService;

/**
 * 
 * @author 作者 jgshun
 * @date 创建时间 2016年07月26日 16时40分30秒
 */
public interface IRCategorySourceService extends IBaseService<RCategorySource> {
	Pagination<EnhancedRCategorySource> getPaginationByCategoryIdsForIntersection(List<Long> categoryIds, List<StatusEnumForPublish> statuses, List<ItemTypeEnumForSource> returnItemTypes,
			List<ProgressStatusForSource> progressStatuses, Pagination<EnhancedRCategorySource> pagination, UserContext userContext);

	Pagination<EnhancedRCategorySource> getPagination(RCategorySourceQuery rCategorySourceQuery, Pagination<EnhancedRCategorySource> pagination, UserContext userContext);

	List<EnhancedRCategorySource> appendEnhancedItem(List<EnhancedRCategorySource> enhancedRCategorySources, UserContext userContext);

	EnhancedRCategorySource appendEnhancedDCategories(EnhancedRCategorySource enhancedRCategorySource, UserContext userContext);

	List<EnhancedRCategorySource> appendEnhancedDCategories(List<EnhancedRCategorySource> enhancedRCategorySources, UserContext userContext);

	EnhancedRCategorySource appendEnhancedUsers(EnhancedRCategorySource enhancedRCategorySource, UserContext userContext);

	List<EnhancedRCategorySource> appendEnhancedUsers(List<EnhancedRCategorySource> enhancedRCategorySources, UserContext userContext);

	/**
	 * 更新热门排序，排序，发布状态
	 * 
	 * @param rCategorySource
	 * @param userContext
	 * @throws UserContextException
	 */
	void update(RCategorySource rCategorySource, UserContext userContext) throws UserContextException;

	EnhancedRCategorySource getEnhancedByItem(long itemId, ItemTypeEnumForSource itemType, UserContext userContext);

	List<EnhancedRCategorySource> getEnhancedsByItems(List<Long> itemIds, ItemTypeEnumForSource itemType, UserContext userContext);
}
